package _24_beiwanglu_pattern.v3_0;

/**
 * @Description: 备忘录模型
 * @Auther: 2019/6/9 0:27 by zhang.jy
 */
public class Client {
     public static void main(String[] args) {
             //定义出发起人
             Originator originator = new Originator();
             //定义出备忘录管理员
             Caretaker caretaker = new Caretaker();
             //创建一个备忘录
             caretaker.setMemento(originator.createMemento());
             //恢复一个备忘录
             originator.restoreMemento(caretaker.getMemento());
     }
}